/**
 * Http请求方式
 */
export type HttpMethod = 'get' | 'post' | 'put' | 'delete';

/**
 * 查询对象
 */
export class SearchObject {
  private currentPage?: number = 1;

  private pageSize?: number = 10;

  UserId?: string;

  Keywords?: string;

  get CurrentPage() {
    return (this.currentPage || 0) < 1 ? 1 : (this.currentPage || 1);
  }

  set CurrentPage(value: number) {
    this.currentPage = value < 1 ? 1 : value;
  }

  get PageSize() {
    return (this.pageSize || 0) < 1 ? 10 : (this.pageSize || 10);
  }

  set PageSize(value: number) {
    this.pageSize = value < 1 ? 10 : value;
  }
}

export interface DataRenderColumn {
  title: string;
  dataIndex: string;
  width: number;
  slot?: string;
}

export interface iWorkflowResponse<T> {
  code: number;

  message: string;

  data: T;
}

export class iWorkflowPagedData {
  readonly dataList?: any[];

  totalCount: number = 0;
}